package com.it.mapper;

import com.it.pojo.Classes;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ClassesMapper {

    @Select("select id, cname from classes")
    List<Classes> getAll();

    @Insert("insert into classes(cname) values(#{cname})")
    void add(Classes cls);

    @Update("update classes set cname = #{cname} where id = #{id}")
    void update(Classes cls);

    @Delete("delete from classes where id = #{id}")
    void delete(Integer id);

}
